<?php namespace App\Models;

use CodeIgniter\Model;

class PageLinksModel extends Model
{
    protected $table ='page_links';
    protected $primaryKey = 'id';
    protected $allowedFields = ['from_page_id', 'to_page_id', 'link_url','link_txt'];

    public function getAllLinks()
    {
        return $this->findAll();
    }

    // 添加 emptyTable 方法
    public function emptyTable()
    {
        return $this->truncate();
    }
}